package com.pb.infra.auth.mapper.custom;

import com.pb.infra.auth.entity.custom.PriviMenuCustom;
import com.pb.infra.auth.entity.pbsys.PriviMenu;
import com.pb.infra.oth.entity.common.Tree;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 菜单管理
 *
 * @author liudebao
 * @date 2020/1/1
 */
@Mapper
@Repository
public interface PriviMenuCustomMapper {

    /**
     * 读取全量菜单信息
     *
     * @return List<Tree> 全量菜单信息
     */
    List<Tree> getMenus(String appId);

    /**
     * 读取菜单表中最大菜单编号+1
     *
     * @return Map<String, Object> 菜单表中最大菜单编号+1
     */
    Integer getMaxMenuId();

    /**
     * 读取某个菜单信息
     *
     * @param priviMenu 某个菜单代码
     * @return List<Map < String, Object>> 某个菜单信息
     */
    List<Map<String, Object>> getMenuById(PriviMenuCustom priviMenu);

    /**
     * 序号最大值
     * @return
     */
    Integer getMaxSeqId();

    /**
     * 删除法人菜单
     * @param menuId
     */
    void delCorpMenu(String menuId);

    void delMenuInter(String menuId);

    PriviMenu selectEnName(String enName);

}
